float4x4 worldViewProjection : WorldViewProjection;

sampler tex1;
sampler tex2;
int compoundType;

struct VertexShaderInput {
	float4 position : POSITION;
	float2 tex :TEXCOORD0;
};
	
VertexShaderInput vertexShaderFunction(VertexShaderInput input) {
	VertexShaderInput output;

	output.position = mul(input.position, worldViewProjection);
	output.tex = input.tex;
	return output;
}
  
float4 pixelShaderFunction(VertexShaderInput input): COLOR {
	input.tex.y = 1 - input.tex.y;
	float4 color1 = tex2D(tex1, input.tex);
	float4 color2 = tex2D(tex2, input.tex);
	if(compoundType == 1)
		return color1*color2;
	else if(compoundType == 2)
		return color1+color2;
	else
		return float4(1, 1, 1, 1);
}
  
// #o3d VertexShaderEntryPoint vertexShaderFunction
// #o3d VertexShaderEntryPoint vertexShaderFunction
// #o3d PixelShaderEntryPoint pixelShaderFunction
// #o3d MatrixLoadOrder RowMajor